home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Programmer Disk
/
The Programmer Disk (Microforum).iso
/
xpro
/
qb2
/
pro16
/
wdce.bas
< prev
next >
Wrap
BASIC Source File
|
1992-02-06
|
5KB
|
110 lines
' WDCE.Bas
' Portions Copyright 1987-1990 Microsoft Corp.
WindowDoClickEvent:
SELECT CASE HSClick(currEvent).action
CASE 1 'ButtonClick
SELECT CASE HSClick(currEvent).misc2
CASE 1
IF ButtonHighLight THEN
IF currButton <> HSClick(currEvent).misc THEN
ButtonSetState currButton, origState
currButton = HSClick(currEvent).misc
ButtonSetState currButton, 3
END IF
ELSE
currButton = HSClick(currEvent).misc
origState = ButtonInquire(currButton)
ButtonHighLight = TRUE
ButtonSetState currButton, 3
END IF
currCursorRow = HSClick(currEvent).row1
currCursorCol = HSClick(currEvent).col1 + 1
GOSUB WindowDoShowTextCursor
CASE 2, 3
currCursorRow = HSClick(currEvent).row1
currCursorCol = HSClick(currEvent).col1 + 1
GOSUB WindowDoShowTextCursor
CASE 4
IF ButtonHighLight THEN
ButtonSetState currButton, origState
END IF
GloStorage.oldDialogEvent = 1
GloStorage.oldDialogButton = HSClick(currEvent).misc
GloStorage.oldDialogRow = _
MouseRow - HSClick(currEvent).row1 + 1
GloStorage.oldDialogCol = _
MouseCol - HSClick(currEvent).col1 + 1
ExitFlag = TRUE
CASE 5
IF ButtonHighLight THEN
IF currButton <> HSClick(currEvent).misc THEN
ButtonSetState currButton, origState
currButton = HSClick(currEvent).misc
ButtonSetState currButton, 3
END IF
ELSE
currButton = HSClick(currEvent).misc
origState = ButtonInquire(currButton)
ButtonHighLight = TRUE
ButtonSetState currButton, 3
END IF
currCursorRow = HSClick(currEvent).row1 + 1
currCursorCol = HSClick(currEvent).col1 + 2
GOSUB WindowDoShowTextCursor
CASE 6
GloStorage.oldDialogEvent = 1
GloStorage.oldDialogButton = HSClick(currEvent).misc
IF MouseRow = HSClick(currEvent).row1 THEN
GloStorage.oldDialogScroll = -1
ELSEIF MouseRow = HSClick(currEvent).row2 THEN
GloStorage.oldDialogScroll = -2
ELSE
GloStorage.oldDialogScroll = _
MouseRow - HSClick(currEvent).row1
END IF
ExitFlag = TRUE
CASE 7
GloStorage.oldDialogEvent = 1
GloStorage.oldDialogButton = HSClick(currEvent).misc
IF MouseCol = HSClick(currEvent).col1 THEN
GloStorage.oldDialogScroll = -1
ELSEIF MouseCol = HSClick(currEvent).col2 THEN
GloStorage.oldDialogScroll = -2
ELSE
GloStorage.oldDialogScroll = _
MouseCol - HSClick(currEvent).col1
END IF
ExitFlag = TRUE
CASE ELSE
END SELECT
CASE 2 'Edit Field Click
GloStorage.oldDialogEvent = 2 'Event ID #2
GloStorage.oldDialogEdit = HSClick(currEvent).misc
ExitFlag = TRUE
CASE 5
GOSUB WindowDoSize 'Internally handle Re-Size
ExitFlag = TRUE
GloStorage.oldDialogEvent = 5
CASE 15
GOSUB WindowDoHideTextCursor
GOSUB WindowDoMove 'Internally handle Move
ExitFlag = TRUE
GloStorage.oldDialogEvent = 15
CASE ELSE
END SELECT
IF HSClick(currEvent).action <> 1 THEN
GOSUB WindowDoUnHighlightButton
END IF
RETURN